In the field of cellular phones, digital cameras, etc. having liquid crystal panels, there is, for the purpose of reducing power consumption and preventing a malfunction of a touch panel, a growing demand for mounting of a proximity sensor that causes the liquid crystal panel and the touch panel to be turned off when a face comes close to the liquid crystal panel. Since the output value of a proximate sensor is inversely proportional to the distance detected, there is also a demand for use of a proximity sensor as a range sensor. Further, there is also a demand for use of a proximity sensor as a motion sensor to detect a motion of a hand or the like from changes over time in the respective output values of a plurality of photodiodes disposed in the proximity sensor.
A cellular phone, a digital camera, or the like mounted with such a sensor is often used outdoors, and the sensor is required to operate properly even in a case where a highly intense disturbance DC light component such as sunlight is incident on the sensor. A circuit configuration that satisfies this requirement is described here.
A general method of sensor detection is a method in which a sensor output is converted into a digital value by an analog-digital conversion circuit. In recent years, as a proximity sensor, a system has been employed which includes an integral-mode analog-digital conversion circuit and a drive circuit of a light-emitting diode (LED).
As a conventional technology concerning an analog-digital conversion circuit, a system described in a Patent Literature 1 is proposed.
FIG. 16 is a circuit diagram showing a configuration of an analog-digital conversion circuit 100 described in Patent Literature 1. The analog-digital conversion circuit 100 includes: a voltage follower 101, which performs impedance conversion of a measured voltage Vin; a capacitor 102, which is charged by an output voltage from the voltage follower 101; a negative power supply 103; a constant current circuit 104, which discharges, into the negative power supply 103, an electric charge put into the capacitor 102; a comparator 105, which receives a terminal voltage of the capacitor 102 as an input voltage; a clock circuit 106, which outputs clock pulses; a counter 107, which counts the clock pulses; a charge switch 108; a discharge switch 109; and a control circuit 110, which controls opening and closing of the charge switch 108 and the discharge switch 109. This enables the analog-digital conversion circuit 100 to perform analog-digital conversion of an input voltage value with a simple configuration.
Further, as a conventional technology concerning an illuminance sensor in which an analog-digital conversion circuit is used, a system described in a Patent Literature 2 is proposed.
FIG. 17 is a circuit diagram showing a configuration of an illuminance sensor 200 described in Patent Literature 2. The illuminance sensor 200 includes: a photodiode PD, which converts light serving as an object to be measured into an electric current; and an analog-digital conversion circuit (a charge and discharge section 210 and a control computation section 220), which receives an output from the photodiode PD as an input current. The illuminance sensor 200 is configured to perform digital output according to illuminance. The charge and discharge section 210 includes a charge circuit 211, a first discharge circuit 212, a second discharge circuit 213, and a comparison circuit 214.
The charge circuit 211 is means by which an electric charge corresponding to an input current (a detection current of the photodiode PD) is stored during a predetermined charge period. The charge circuit 211 includes: an operational amplifier AMP; a charging capacitor C201, one end of which is connected to an inverting input terminal (−) of the operational amplifier AMP201 and the other end of which is connected to an output terminal of the operational amplifier AMP201; a first constant voltage source E201, which applies a predetermined first reference voltage V201 to a non-inverting input terminal (+) of the operational amplifier AMP201; a first switch SW201, which opens or closes between an input terminal via which the input current is inputted (i.e. an anode of the photodiode PD) and the one end of the charging capacitor C201 in accordance with a control signal S201; and a second switch SW202, which short-circuits between the two ends of the charging capacitor C201 in accordance with a control signal S202.
The first discharge circuit 212 is means by which an electric charge stored in the charge circuit 211 is discharged every time the amount of electric charge in the charge circuit 211 reaches a predetermined threshold value during the charge period. The first discharge circuit 212 includes: a first discharging capacitor C202 (1/m (m>1) of the charging capacitor C201); third switches SW203a and SW203b, which open or close between one end of the first discharging capacitor C202 and a ground terminal and between the other end of the first discharging capacitor C202 and the inverting input terminal (−) of the operational amplifier AMP201, respectively, in accordance with a control signal S203; and fourth switches SW204a and SW204b, which open or close between the two ends of the first discharging capacitor C202 and a terminal via which the first reference voltage V201 is applied, respectively, in accordance with a control signal S204.
The second discharge circuit 213 is means by which after expiration of the charge period, an electric charge remaining in the charge circuit 211 is discharged stepwise by a predetermined amount with a lower discharge capacity than that of the first discharge circuit 212 until the residual charge takes on a predetermined value. The second discharge circuit 213 includes: a second discharging capacitor C203 (1/n (n>m) of the charging capacitor C201); a second constant voltage source E202, which generates a second reference voltage V202 (1/k (k>1) of the first reference voltage V201); fifth switches SW205a and SW205b, which open or close between one end of the second discharging capacitor C203 and a positive terminal of the second constant voltage source E202 and between the other end of the second discharging capacitor C203 and the inverting input terminal (−) of the operational amplifier AMP201, respectively, in accordance with a control signal S205; and sixth switches SW206a and SW206b, which open or close between the two ends of the second discharging capacitor C203 and a terminal via which the first reference voltage Vref is applied, respectively, in accordance with a control signal S206.
The comparison circuit 214 is means by which an output voltage Va from the operational amplifier AMP201 is compared with a third reference voltage V203 (Vref) and a fourth reference voltage V204 (Vref/2). The comparison circuit 214 includes: a third constant voltage source E203, which generates a third reference voltage V203; a fourth constant voltage source E204, which generates a fourth reference voltage V204; a first comparator CMP201, a non-inverting input terminal (+) of which is connected to the output terminal of the operational amplifier AMP201 and an inverting input terminal (−) of which is connected to a positive terminal of the third constant voltage source E203; and a second comparator CMP202, an inverting input terminal (−) of which is connected to the output terminal of the operational amplifier AMP201 and a non-inverting input terminal (+) of which is connected to a positive terminal of the fourth constant voltage source E204.
The control computation section 220 is means by which the control signals S201 to S206 are generated in accordance with a predetermined clock signal CLK and output signals CO201 and CO202 from the respective comparison circuits CMP201 and CMP202, by which charge and discharge control of the charge circuit 211 and the discharge circuits 212 and 213 is performed, by which the total amount of electric charge in the charge circuit 211 is computed from the total number of times the discharge circuit 212 and 213 performed discharge, and by which a digital output (DOUT) corresponding to a result of the computation is produced.
In the analog-digital conversion circuit, which is constituted by the charge and discharge section 210 and the control computation section 220, the capacitor C201 is charged during the specified charge time and discharged by the first discharge circuit 212 every time the capacitor C201 takes on a predetermined amount of electric charge. Then, by causing an electric charge after the end of the charge time to be discharged by second discharge circuit 213, the analog-digital conversion circuit outputs a digital value according to the amount of electric charge in the capacitor C201 in accordance with the number of times the first discharge circuit 212 performed discharge and the duration that the second discharge circuit 213 performed discharge. This enables the configuration of Patent Literature 2 to expand an input dynamic range, improve limiting resolution, and shorten measuring time.
FIG. 18 is a diagram schematically showing a configuration of a general proximity sensor 300. The proximity sensor 300 includes a light-emitting diode (LED) 310, a photodiode 320, and a control circuit 330. The control circuit 330 supplies a pulse current to the light-emitting diode 310 to drive the light-emitting diode 310. In the presence of an object 400 near the proximity sensor 300, pulsed light from the light-emitting diode 310 is reflected by the object 400 and received by the photodiode 320 as indicated by solid arrows. On the other hand, in the absence of the object 400, pulsed light from the light-emitting diode 310 is not reflected by the object 400, as indicated by a dashed arrow, with the result that the pulsed light from the the light-emitting diode 310 hardly reaches the photodiode 320.
The photodiode 320 converts the pulsed light thus received into a pulse current and outputs the pulse current to the control circuit 330. The control circuit 300 determines, in accordance with the magnitude of the pulse current from the photodiode 320, whether or not the object 400 is present near the proximity sensor 300.
FIG. 19 is a diagram showing an example of a configuration of the control circuit 330 of the proximity sensor 300. The control circuit 330 includes an analog-digital conversion circuit 331, a sample-hold circuit 332, a subtraction circuit 333, and a comparison circuit 334. The analog-digital conversion circuit 331 converts the input current from the photodiode 320 into a digital value. As the analog-digital conversion circuit 331, an analog-digital conversion circuit described in Patent Literature 1 or 2 is used.
The sample-hold circuit 332 holds an output digital value Data1 of the analog-digital conversion circuit 331 during a period in which the light-emitting diode 310 is being driven. After that, when the analog-digital conversion circuit 331 stops being driven, the sample-hold circuit 332 outputs the digital value Data1 to the subtraction circuit 333.
The subtraction circuit 333 subtracts, from the digital value Data1, an output digital value Data2 of the analog-digital conversion circuit 331 during a period in which the light-emitting diode 310 is not being driven, and outputs a difference Data1−Data2 to the comparison circuit 334. The comparison circuit 334 compares the difference Data1−Data2 with a threshold value Data_th and outputs a result of the comparison.
FIG. 20 is a set of waveform charts (a) and (b) showing the respective waveforms of drive signals from the light-emitting diode 310 of the proximity sensor 300, digital signals DOUT from the analog-digital conversion circuit 331, and output signals from the comparison circuit 334, (a) showing a case where there is a detected object, (b) showing a case where there is no detected object. The difference Data1−Data2 between Data1, which is a digital signal DOUT during a period in which the light-emitting diode 310 is being driven, and Data2, which is a digital signal DOUT during a period in which the light-emitting diode 310 is not being driven, serves as proximity information. The comparison circuit 334 determines whether or not any object is proximate by comparing the difference Data1−Data2 with the digital threshold value Data_th.
In the case where there is a detected object (e.g. the object 400 shown in FIG. 18), light reflected from the detected object causes the photodiode 320 to generate a larger current, with the result that the difference Data1−Data2 exceeds the digital threshold value Data_th as shown in (a) of FIG. 20. Accordingly, the comparison circuit 334 determines that the detected object is proximate. In the case where there is no detected object, there is no light reflected from any object, with the result that the difference Data1−Data2 falls short of the digital threshold value Data_th as shown in (b) of FIG. 20. Accordingly, the comparison circuit 334 determines that no object is proximate.
Further, the output value of the analog-digital conversion circuit 331 is inversely proportional to the square of the distance between a detected object and the proximity sensor 300, it is possible to apply the proximity sensor 300 as a range sensor.
FIG. 21 is a set of waveform charts (a) and (b) showing the respective waveforms of drive signals from the light-emitting diode 310 of the proximity sensor 300, digital signals DOUT from the analog-digital conversion circuit 331, and output signals from the comparison circuit 334 in the case of the proximity sensor 300 operating as a range sensor, (a) showing a case where there is an object detected at a short distance, (b) showing a case where there is an object detected at a long distance. The longer the distance between the proximity sensor 300 and a detected object is, the smaller the difference Data1−Data2 is. This makes it possible to determine whether the detected object is at a short or long distance.